{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "4c084fd4",
   "metadata": {},
   "source": [
    "# 上课笔记"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2871ac5e",
   "metadata": {},
   "outputs": [],
   "source": [
    "## 准备工作 （准备要用到的模块和函数）\n",
    "from datetime import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "1481360a",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.datetime(2021, 9, 12, 13, 53, 48, 277999)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.today()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "a4fcfad5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 课本代码（项目一，从奇数中选择对应的时间节点）\n",
    "\n",
    "odds = [1,3,5,7,9,11,13,15,17,19,21,23,25,]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b6c3f9df",
   "metadata": {},
   "source": [
    "\n",
    "-------------------------分割线----------------------------------\n",
    "\n",
    "# 书本运行代码\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "fe898378",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-10-b902187a239f>, line 7)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-10-b902187a239f>\"\u001b[1;36m, line \u001b[1;32m7\u001b[0m\n\u001b[1;33m    47,49,51,53,55,57,59]\u001b[0m\n\u001b[1;37m    ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime \n",
    "\n",
    "import random\n",
    "import time\n",
    "\n",
    "odds = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45\n",
    "       47,49,51,53,55,57,59]\n",
    "\n",
    "for i in range(5)\n",
    "right_this_minute = datetime.today().minute\n",
    "if right_this_minute in odds:\n",
    "    print(\"This minute seems a little odd,\")\n",
    "else:\n",
    "    print(\"Not an odd minute.\")\n",
    "wait_time = random.randint(1,60)\n",
    "time.sleep(wait_time)\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ac73683e",
   "metadata": {},
   "source": [
    "为什么错了呀QAQ，为什么这么难呀"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b06f6a05",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
